﻿<UserControl x:Class="AphidUI.Internal.CodeCanvas"
             x:Name="LayoutRoot"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             Focusable="True"
             HorizontalAlignment="Left"
             VerticalAlignment="Top"
             SizeChanged="UserControl_SizeChanged"
             mc:Ignorable="d" 
             FocusVisualStyle="{x:Null}"
             d:DesignHeight="300" d:DesignWidth="300">
    <Canvas x:Name="Canvas" Background="Transparent" Focusable="True" FocusVisualStyle="{x:Null}"
            MouseDown="UserControl_MouseDown" Cursor="IBeam">            
    <Border x:Name="LineBorder" Height="14" HorizontalAlignment="Stretch" 
            BorderThickness="1.5" BorderBrush="LightGray" Margin="0" />
    <Rectangle x:Name="_caret" Height="12" Width="1" Fill="Black">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="_caret"
                                                Storyboard.TargetProperty="Opacity"
                                                From="0"
                                                To="1"
                                                RepeatBehavior="Forever"
                                                AutoReverse="True"
                                                Duration="0:0:0.5"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
    </Canvas>
    <FocusManager.FocusedElement>
        <Binding ElementName="Canvas"/>
    </FocusManager.FocusedElement>
</UserControl>
